<?php
	$frontController = Zend_Controller_Front::getInstance();
	$module = $frontController->getRequest()->getModuleName();
	$controller = $frontController->getRequest()->getControllerName();
	$action = $frontController->getRequest()->getActionName();
	$sessions = Eicra_Global_Variable::getSession();
	$translator = Zend_Registry::get('translator');
	$form_id = $frontController->getRequest()->getParam('form_id');
	$form_id_link = ($form_id)? '/form_id/'.$form_id : '';
	$approve = $frontController->getRequest()->getParam('approve');
	$form_id_link .= ($approve != '')? '/approve/'.$approve : '';
?>

<?php echo $translator->translator('pagination_total'); ?> <?php echo $this->totalItemCount; ?> <?php echo $translator->translator('pagination_records_found'); ?> &nbsp; | &nbsp; <?php echo $translator->translator('pagination_Page'); ?> <?php echo $this->current; ?> <?php echo $translator->translator('pagination_of'); ?> <?php echo $this->last;  ?>
<div class="page-no">
	<?php echo $translator->translator('pagination_jump_page'); ?> 
    <select name="PageNum" id="PageNum" onChange="document.location.href='<?php echo $this->baseUrl().'/'.$module.'/'.$controller.'/'.$action.$form_id_link.'/page/';?>'+this.options[this.selectedIndex].value">
        <?php
            for($i=1;$i<=$this->pageCount;$i++)
            {
        ?>
        <option value="<?php echo $i; ?>" <?php if($this->current == $i){ ?>selected="selected"<?php } ?>><?php echo $i; ?></option>
        <?php
            }
        ?>							
    </select>
	
    <form id="form1" name="form1" method="post" action="<?php echo $this->url(array('module' => $module,'controller'=>$controller,'action' => $action, 'form_id' => $form_id, 'approve' => $approve),'adminrout',true);?>">
	   <?php echo $translator->translator('pagination_view_result_per_page'); ?> 
       <select name="viewPageNum" id="viewPageNum" onChange="form.submit();">
            <option value="1" <?php if($sessions->viewPageNum == '1'){  ?>selected="selected"<?php } ?>>1</option>
            <option value="2" <?php if($sessions->viewPageNum == '2'){  ?>selected="selected"<?php } ?>>2</option>
            <option value="5" <?php if($sessions->viewPageNum == '5'){  ?>selected="selected"<?php } ?>>5</option>
            <option value="10" <?php if($sessions->viewPageNum == '10'){ ?>selected="selected"<?php } ?>>10</option>
            <option value="30" <?php if($sessions->viewPageNum == '30'){ ?>selected="selected"<?php } ?>>30</option>
            <option value="100" <?php if($sessions->viewPageNum == '100'){ ?>selected="selected"<?php } ?>>100</option>
        </select>
	</form> 			                              
</div>